package com.bdqn.t320.ch03mybatis.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bdqn.t320.ch03mybatis.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

//@Mapper
public interface UserMapper extends BaseMapper<User> {

    public void insert1(User user);

    public void delete(Long id);

    public void update(User user);

    public User get(Long id);

    public List<User> findAll();

    @Insert("INSERT INTO sys_user (usr_name, usr_password, usr_role_id, usr_flag) values (#{usrName}, #{usrPassword}, #{usrRoleId}, #{usrFlag})")
    public void insertAnno(User user);
}
